package com.cw.lang.common.mapper.common.list;

import java.util.List;

import org.apache.ibatis.annotations.UpdateProvider;

import com.cw.lang.common.mapper.provider.list.UpdateListProvider;

import tk.mybatis.mapper.annotation.RegisterMapper;

/**
 * 针对于mysql，要求配置url时带上allowMultiQueries=true
 *
 * @author chenw
 * @version V2.1
 * @since 2.1.0 2019-03-20 14:12
 */
@RegisterMapper
public interface UpdateByPrimaryKeyListMapper<T> {

    /**
     * 批量更新，null值会被更新
     *
     * @param recordList 记录
     */
    @UpdateProvider(type = UpdateListProvider.class, method = "dynamicSQL")
    void updateByPrimaryKeyList(List<T> recordList);
}
